<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragments::head(~{::title})">
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>博客</title>

  <link href="https://cdn.bootcss.com/semantic-ui/2.4.1/semantic.min.css" rel="stylesheet">
  <link rel="stylesheet" href="../static/css/main.css">
</head>
<body>
<!--顶部导航-->
<header th:replace="_fragments::header(1)" class="ui inverted attached segment m-shadow-small">
  <div class="ui container">
    <nav class="ui inverted secondary stackable menu">
      <h2 class="ui header teal item m-header-logo">Blog</h2>
      <a href="#" class="m-header-item m-hide-on-mobile item"><i class="small home icon"></i> 首页</a>
      <a href="#" class="m-header-item m-hide-on-mobile item"><i class="small idea icon"></i> 分类</a>
      <a href="#" class="m-header-item m-hide-on-mobile item"><i class="small tag icon"></i> 标签</a>
      <a href="#" class="m-header-item m-hide-on-mobile item"><i class="small clone icon"></i> 归档</a>
      <a href="#" class="m-header-item m-hide-on-mobile item"><i class="small info icon"></i> 关于我</a>
      <div class="right item m-header-item m-hide-on-mobile">
        <div class="ui icon inverted transparent input">
          <input type="text" placeholder="Search...">
          <i class="search link icon"></i>
        </div>
      </div>
    </nav>
  </div>

  <a href="#" class="ui black icon button m-header-toggle-icon m-show-on-mobile toggle">
    <i class="sidebar icon"></i>
  </a>
</header>

<!--中间内容-->
<section class="m-padding-tb-large animated fadeIn">
  <div class="ui container">
    <div class="ui stackable grid">
      <!--文章列表-->
      <div class="eleven wide column">
        <!--header-->
        <header class="ui top attached segment">
          <div class="ui middle aligned two column grid">
            <div class="column">
              <h3 class="ui teal header">博客</h3>
            </div>
            <div class="right aligned column m-text-thin">
              共 <h3 class="ui orange header m-inline-block" th:text="${page.totalElements}">14</h3> 篇
            </div>
          </div>
        </header>
        <!--header-->

        <!--content-->
        <section class="ui attached segment">
          <article class="ui vertical padded segment m-padding-tb-small" th:each="article : ${articles}"
                   th:object="${article}">
            <div class="ui middle aligned mobile reversed stackable grid">
              <!--文章内容-->
              <div class="eleven wide column">
                <!--标题-->
                <h3 class="ui header">
                  <a href="" class="m-text-dark-gray" target="_blank"
                     th:text="*{title}" th:href="@{/blog/{id}(id=*{id})}">
                    你真的理解什么是财富自由吗？
                  </a>
                </h3>
                <!--正文-->
                <p class="m-text-article" th:text="|*{description}...|">不，你不理解！</p>
                <!--操作-->
                <div class="ui grid">
                  <div class="eleven wide column">
                    <div class="ui mini horizontal link list">
                      <div class="item">
                        <img src="https://picsum.photos/50" alt="" class="ui avatar image"
                             th:href="@{${article.user.avatar}}">
                        <div class="content">
                          <div class="header">
                            <a href="#" class="header" th:text="*{user.nickname}">Misty</a>
                          </div>
                        </div>
                      </div>

                      <div class="item">
                        <i class="calendar icon"></i>
                        <span th:text="${#dates.format(article.updateTime,'yyyy-MM-dd')}">2020-2-24</span>
                      </div>

                      <div class="item">
                        <i class="eye icon"></i> <span th:text="*{views}">123</span>
                      </div>
                    </div>
                  </div>

                  <div class="right aligned five wide column">
                    <a href="#" target="_blank"
                       class="ui teal basic label m-padding-tiny m-text-thin"
                       th:text="*{category?.name}">认知升级</a>
                  </div>
                </div>
              </div>
              <!--图片-->
              <div class="five wide column">
                <a href="#" target="_blank" th:href="@{/blog/{id}(id=*{id})}">
                  <img src="https://picsum.photos/800/450" alt="" class="ui rounded image"
                       th:src="@{${article.firstPicture}}">
                </a>
              </div>
            </div>
          </article>

          <!--/*-->
          <article class="ui vertical padded segment m-padding-tb-small">
            <div class="ui stackable grid mobile reversed">
              <!--文章内容-->
              <div class="eleven wide column">
                <!--标题-->
                <h3 class="ui header">你真的理解什么是财富自由吗？</h3>
                <!--正文-->
                <p class="m-text-article">不，你不理解！</p>
                <!--操作-->
                <div class="ui grid">
                  <div class="eleven wide column">
                    <div class="ui mini horizontal link list">
                      <div class="item">
                        <img src="https://picsum.photos/50" alt="" class="ui avatar image">
                        <div class="content">
                          <div class="header"><a href="#" class="header">Misty</a></div>
                        </div>
                      </div>

                      <div class="item">
                        <i class="calendar icon"></i> 2020-2-24
                      </div>

                      <div class="item">
                        <i class="eye icon"></i> 1234
                      </div>
                    </div>
                  </div>

                  <div class="right aligned five wide column">
                    <a href="#" target="_blank"
                       class="ui teal basic label m-padding-tiny m-text-thin">认知升级</a>
                  </div>
                </div>
              </div>
              <!--图片-->
              <div class="five wide column">
                <a href="#" target="_blank">
                  <img src="https://picsum.photos/800/450" alt="" class="ui rounded image">
                </a>
              </div>
            </div>
          </article>

          <article class="ui vertical padded segment m-padding-tb-small">
            <div class="ui stackable grid mobile reversed">
              <!--文章内容-->
              <div class="eleven wide column">
                <!--标题-->
                <h3 class="ui header">你真的理解什么是财富自由吗？</h3>
                <!--正文-->
                <p class="m-text-article">不，你不理解！</p>
                <!--操作-->
                <div class="ui grid">
                  <div class="eleven wide column">
                    <div class="ui mini horizontal link list">
                      <div class="item">
                        <img src="https://picsum.photos/50" alt="" class="ui avatar image">
                        <div class="content">
                          <div class="header"><a href="#" class="header">Misty</a></div>
                        </div>
                      </div>

                      <div class="item">
                        <i class="calendar icon"></i> 2020-2-24
                      </div>

                      <div class="item">
                        <i class="eye icon"></i> 1234
                      </div>
                    </div>
                  </div>

                  <div class="right aligned five wide column">
                    <a href="#" target="_blank"
                       class="ui teal basic label m-padding-tiny m-text-thin">认知升级</a>
                  </div>
                </div>
              </div>
              <!--图片-->
              <div class="five wide column">
                <a href="#" target="_blank">
                  <img src="https://picsum.photos/800/450" alt="" class="ui rounded image">
                </a>
              </div>
            </div>
          </article>

          <article class="ui vertical padded segment m-padding-tb-small">
            <div class="ui stackable grid mobile reversed">
              <!--文章内容-->
              <div class="eleven wide column">
                <!--标题-->
                <h3 class="ui header">你真的理解什么是财富自由吗？</h3>
                <!--正文-->
                <p class="m-text-article">不，你不理解！</p>
                <!--操作-->
                <div class="ui grid">
                  <div class="eleven wide column">
                    <div class="ui mini horizontal link list">
                      <div class="item">
                        <img src="https://picsum.photos/50" alt="" class="ui avatar image">
                        <div class="content">
                          <div class="header"><a href="#" class="header">Misty</a></div>
                        </div>
                      </div>

                      <div class="item">
                        <i class="calendar icon"></i> 2020-2-24
                      </div>

                      <div class="item">
                        <i class="eye icon"></i> 1234
                      </div>
                    </div>
                  </div>

                  <div class="right aligned five wide column">
                    <a href="#" target="_blank"
                       class="ui teal basic label m-padding-tiny m-text-thin">认知升级</a>
                  </div>
                </div>
              </div>
              <!--图片-->
              <div class="five wide column">
                <a href="#" target="_blank">
                  <img src="https://picsum.photos/800/450" alt="" class="ui rounded image">
                </a>
              </div>
            </div>
          </article>

          <article class="ui vertical padded segment m-padding-tb-small">
            <div class="ui stackable grid mobile reversed">
              <!--文章内容-->
              <div class="eleven wide column">
                <!--标题-->
                <h3 class="ui header">你真的理解什么是财富自由吗？</h3>
                <!--正文-->
                <p class="m-text-article">不，你不理解！</p>
                <!--操作-->
                <div class="ui grid">
                  <div class="eleven wide column">
                    <div class="ui mini horizontal link list">
                      <div class="item">
                        <img src="https://picsum.photos/50" alt="" class="ui avatar image">
                        <div class="content">
                          <div class="header"><a href="#" class="header">Misty</a></div>
                        </div>
                      </div>

                      <div class="item">
                        <i class="calendar icon"></i> 2020-2-24
                      </div>

                      <div class="item">
                        <i class="eye icon"></i> 1234
                      </div>
                    </div>
                  </div>

                  <div class="right aligned five wide column">
                    <a href="#" target="_blank"
                       class="ui teal basic label m-padding-tiny m-text-thin">认知升级</a>
                  </div>
                </div>
              </div>
              <!--图片-->
              <div class="five wide column">
                <a href="#" target="_blank">
                  <img src="https://picsum.photos/800/450" alt="" class="ui rounded image">
                </a>
              </div>
            </div>
          </article>

          <article class="ui vertical padded segment m-padding-tb-small">
            <div class="ui stackable grid mobile reversed">
              <!--文章内容-->
              <div class="eleven wide column">
                <!--标题-->
                <h3 class="ui header">你真的理解什么是财富自由吗？</h3>
                <!--正文-->
                <p class="m-text-article">不，你不理解！</p>
                <!--操作-->
                <div class="ui grid">
                  <div class="eleven wide column">
                    <div class="ui mini horizontal link list">
                      <div class="item">
                        <img src="https://picsum.photos/50" alt="" class="ui avatar image">
                        <div class="content">
                          <div class="header"><a href="#" class="header">Misty</a></div>
                        </div>
                      </div>

                      <div class="item">
                        <i class="calendar icon"></i> 2020-2-24
                      </div>

                      <div class="item">
                        <i class="eye icon"></i> 1234
                      </div>
                    </div>
                  </div>

                  <div class="right aligned five wide column">
                    <a href="#" target="_blank"
                       class="ui teal basic label m-padding-tiny m-text-thin">认知升级</a>
                  </div>
                </div>
              </div>
              <!--图片-->
              <div class="five wide column">
                <a href="#" target="_blank">
                  <img src="https://picsum.photos/800/450" alt="" class="ui rounded image">
                </a>
              </div>
            </div>
          </article>

          <article class="ui vertical padded segment m-padding-tb-small">
            <div class="ui stackable grid mobile reversed">
              <!--文章内容-->
              <div class="eleven wide column">
                <!--标题-->
                <h3 class="ui header">你真的理解什么是财富自由吗？</h3>
                <!--正文-->
                <p class="m-text-article">不，你不理解！</p>
                <!--操作-->
                <div class="ui grid">
                  <div class="eleven wide column">
                    <div class="ui mini horizontal link list">
                      <div class="item">
                        <img src="https://picsum.photos/50" alt="" class="ui avatar image">
                        <div class="content">
                          <div class="header"><a href="#" class="header">Misty</a></div>
                        </div>
                      </div>

                      <div class="item">
                        <i class="calendar icon"></i> 2020-2-24
                      </div>

                      <div class="item">
                        <i class="eye icon"></i> 1234
                      </div>
                    </div>
                  </div>

                  <div class="right aligned five wide column">
                    <a href="#" target="_blank"
                       class="ui teal basic label m-padding-tiny m-text-thin">认知升级</a>
                  </div>
                </div>
              </div>
              <!--图片-->
              <div class="five wide column">
                <a href="#" target="_blank">
                  <img src="https://picsum.photos/800/450" alt="" class="ui rounded image">
                </a>
              </div>
            </div>
          </article>

          <article class="ui vertical padded segment m-padding-tb-small">
            <div class="ui stackable grid mobile reversed">
              <!--文章内容-->
              <div class="eleven wide column">
                <!--标题-->
                <h3 class="ui header">你真的理解什么是财富自由吗？</h3>
                <!--正文-->
                <p class="m-text-article">不，你不理解！</p>
                <!--操作-->
                <div class="ui grid">
                  <div class="eleven wide column">
                    <div class="ui mini horizontal link list">
                      <div class="item">
                        <img src="https://picsum.photos/50" alt="" class="ui avatar image">
                        <div class="content">
                          <div class="header"><a href="#" class="header">Misty</a></div>
                        </div>
                      </div>

                      <div class="item">
                        <i class="calendar icon"></i> 2020-2-24
                      </div>

                      <div class="item">
                        <i class="eye icon"></i> 1234
                      </div>
                    </div>
                  </div>

                  <div class="right aligned five wide column">
                    <a href="#" target="_blank"
                       class="ui teal basic label m-padding-tiny m-text-thin">认知升级</a>
                  </div>
                </div>
              </div>
              <!--图片-->
              <div class="five wide column">
                <a href="#" target="_blank">
                  <img src="https://picsum.photos/800/450" alt="" class="ui rounded image">
                </a>
              </div>
            </div>
          </article>
          <!--*/-->
        </section>
        <!--content-->

        <!--footer-->
        <footer class="ui bottom attached segment" th:if="${page.totalPages > 1}">
          <div class="ui middle aligned two column grid">
            <div class="column">
              <a href="#" class="ui mini teal basic button"
                 th:if="${page.hasPrevious()}" th:href="@{/(page=${page.number -1})}">上一页</a>
            </div>
            <div class="right aligned column m-text-thin">
              <a href="#" class="ui mini teal basic button"
                 th:if="${page.hasNext()}" th:href="@{/(page=${page.number +1})}">下一页</a>
            </div>
          </div>
        </footer>
        <!--footer-->

      </div>
      <!--文章列表-->

      <!--侧边导航-->
      <aside class="five wide column">
        <!--分类-->
        <section class="ui segments">
          <div class="ui secondary segment">
            <div class="ui two column grid">
              <div class="column">
                <i class="idea icon"></i>分类
              </div>
              <div class="right aligned column">
                <a href="#" target="_blank" th:href="@{/categories}">more <i
                    class="angle double right icon"></i></a>
              </div>
            </div>
          </div>

          <div class="ui teal segment">
            <div class="ui fluid vertical menu">
              <a href="#" class="item" th:each="cate : ${categories}" th:object="${cate}"
                 th:href="@{/categories(cateId=${cate.id})}">
                <span th:text="*{name}">学习日志</span> <span class="ui basic teal left pointing label"
                                                          th:text="*{articles.size()}">13</span>
              </a>
              <!--/*-->
              <a href="#" class="item">
                学习日志 <span class="ui basic teal left pointing label">13</span>
              </a>
              <a href="#" class="item">
                学习日志 <span class="ui basic teal left pointing label">13</span>
              </a>
              <a href="#" class="item">
                学习日志 <span class="ui basic teal left pointing label">13</span>
              </a>
              <a href="#" class="item">
                学习日志 <span class="ui basic teal left pointing label">13</span>
              </a>
              <a href="#" class="item">
                学习日志 <span class="ui basic teal left pointing label">13</span>
              </a>
              <!--*/-->
            </div>
          </div>
        </section>

        <!--标签-->
        <section class="ui segments">
          <div class="ui secondary segment">
            <div class="ui two column grid">
              <div class="column">
                <i class="tags icon"></i>标签
              </div>
              <div class="right aligned column">
                <a href="#" target="_blank" th:href="@{/tags}">
                  more <i class="angle double right icon"></i>
                </a>
              </div>
            </div>
          </div>

          <div class="ui teal segment">
            <a href="" class="ui teal basic label m-margin-tb-mini" th:each="tag:${tags}"
               th:object="${tag}" th:href="@{/tags(tagId=${tag.id})}">
              <span th:text="*{name}">方法论</span>
              <span class="detail" th:text="*{articles.size()}">22</span>
            </a>
            <!--/*-->
            <a href="" class="ui teal basic label m-margin-tb-mini">方法论 <span class="detail">22</span></a>
            <a href="" class="ui teal basic label m-margin-tb-mini">方法论 <span class="detail">22</span></a>
            <a href="" class="ui teal basic label m-margin-tb-mini">方法论 <span class="detail">22</span></a>
            <a href="" class="ui teal basic label m-margin-tb-mini">方法论 <span class="detail">22</span></a>
            <a href="" class="ui teal basic label m-margin-tb-mini">方法论 <span class="detail">22</span></a>
            <a href="" class="ui teal basic label m-margin-tb-mini">方法论 <span class="detail">22</span></a>
            <a href="" class="ui teal basic label m-margin-tb-mini">方法论 <span class="detail">22</span></a>
            <a href="" class="ui teal basic label m-margin-tb-mini">方法论 <span class="detail">22</span></a>
            <a href="" class="ui teal basic label m-margin-tb-mini">方法论 <span class="detail">22</span></a>
            <!--*/-->
          </div>
        </section>

        <!--最新推荐-->
        <section class="ui segments">
          <div class="ui secondary segment">
            <i class="bookmark icon"></i>最新推荐
          </div>
          <div class="ui segment" th:each="article,iterStat : ${recommends}" th:object="${article}"
               th:classappend="${iterStat.first} ? 'teal'">
            <a href="#" target="_blank" class="m-text-dark-gray"
               th:text="*{title}" th:href="@{/blog/{id}(id=*{id})}">
              用户故事 (User Story)
            </a>
          </div>

          <!--/*-->
          <div class="ui segment">
            <a href="#" target="_blank" class="m-text-dark-gray">用户故事 (User Story)</a>
          </div>

          <div class="ui segment">
            <a href="#" target="_blank" class="m-text-dark-gray">用户故事 (User Story)</a>
          </div>
          <!--*/-->
        </section>

        <!--二维码-->
        <h4 class="ui horizontal divider header">扫描关注我</h4>

        <div class="ui centered card" style="width: 11em; padding: 5px">
          <img src="https://via.placeholder.com/110?text=WeChat" alt="" class="ui rounded image"
               style="width: 11em;height: auto">
        </div>
      </aside>
      <!--侧边导航-->
    </div>
  </div>
</section>

<!--footer-->
<footer th:replace="_fragments::footer" class="ui vertical inverted segment m-footer">
  <div class="ui container center aligned">
    <div class="ui stackable grid divided inverted">
      <!--二维码-->
      <div class="three wide column">
        <div class="ui inverted link list">
          <div class="item">
            <img src="https://via.placeholder.com/110?text=WeChat" class="ui rounded image" alt="">
          </div>
        </div>
      </div>
      <!--二维码-->

      <!--最新博客-->
      <div class="three wide column">
        <h4 class="ui inverted header m-text-thin m-text-spacing">最新博客</h4>
        <div class="ui inverted link list">
          <a href="#" class="item">用户故事 (User Story)</a>
          <a href="#" class="item">用户故事 (User Story)</a>
          <a href="#" class="item">用户故事 (User Story)</a>
        </div>
      </div>
      <!--最新博客-->

      <!--联系我-->
      <div class="three wide column">
        <h4 class="ui inverted header m-text-thin m-text-spacing">联系我</h4>
        <div class="ui inverted link list">
          <a href="#" class="item">Email:</a>
          <a href="#" class="item">QQ:</a>
        </div>
      </div>
      <!--联系我-->

      <!--关于-->
      <div class="seven wide column">
        <h4 class="ui inverted header m-text-thin m-text-spacing">关于</h4>
        <p class="m-text-thin m-text-spacing m-opacity-80">這是我的個人博客</p>
      </div>
      <!--关于-->

    </div>
    <div class="ui inverted section divider"></div>
    <p class="m-text-thin m-text-spacing m-opacity-60">by Misty</p>
  </div>
</footer>

<!--/*/ <th:block th:replace="_fragments::scripts"> /*/-->
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/semantic-ui/2.4.1/semantic.min.js"></script>
<!--/*/ </th:block> /*/-->

<script>
    $("header > a.toggle.button").click(function () {
        $(".m-header-item").toggleClass('m-hide-on-mobile');
        return false
    });
</script>
</body>
</html>